<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>系统管理总后台</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.4 -->
    <link href="/Public/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <!-- FontAwesome 4.3.0 -->
 	<link href="/Public/bootstrap/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
    <!-- Ionicons 2.0.0 --
    <link href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" rel="stylesheet" type="text/css" />
    <!-- Theme style -->
    <link href="/Public/dist/css/AdminLTE.min.css" rel="stylesheet" type="text/css" />
    <!-- AdminLTE Skins. Choose a skin from the css/skins 
    	folder instead of downloading all of them to reduce the load. -->
    <link href="/Public/dist/css/skins/_all-skins.min.css" rel="stylesheet" type="text/css" />
    <!-- iCheck -->
    <link href="/Public/plugins/iCheck/flat/blue.css" rel="stylesheet" type="text/css" />   
    <!-- jQuery 2.1.4 -->
    <script src="/Public/plugins/jQuery/jQuery-2.1.4.min.js"></script>
	<script src="/Public/js/global.js"></script>
    <script src="/Public/js/myFormValidate.js"></script>    
    <script src="/Public/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
    <script src="/Public/js/layer/layer-min.js"></script><!-- 弹窗js 参考文档 http://layer.layui.com/-->
    <script src="/Public/js/myAjax.js"></script>
    <script type="text/javascript">
    function delfunc(obj){
    	layer.confirm('确认删除？', {
    		  btn: ['确定','取消'] //按钮
    		}, function(){
   				$.ajax({
   					type : 'post',
   					url : $(obj).attr('data-url'),
   					data : {act:'del',del_id:$(obj).attr('data-id')},
   					dataType : 'json',
   					success : function(data){
   						if(data==1){
   							layer.msg('操作成功', {icon: 1});
   							$(obj).parent().parent().remove();
   						}else{
   							layer.msg(data, {icon: 2,time: 2000});
   						}
   						layer.closeAll();
   					}
   				})
    		}, function(index){
    			layer.close(index);
    			return false;// 取消
    		}
    	);
    }
    
    //全选
    function selectAll(name,obj){
    	$('input[name*='+name+']').prop('checked', $(obj).checked);
    }   
    
    function get_help(obj){
        layer.open({
            type: 2,
            title: '帮助手册',
            shadeClose: true,
            shade: 0.3,
            area: ['90%', '90%'],
            content: $(obj).attr('data-url'), 
        });
    }
    
    function delAll(obj,name){
    	var a = [];
    	$('input[name*='+name+']').each(function(i,o){
    		if($(o).is(':checked')){
    			a.push($(o).val());
    		}
    	})
    	if(a.length == 0){
    		layer.alert('请选择删除项', {icon: 2});
    		return;
    	}
    	layer.confirm('确认删除？', {btn: ['确定','取消'] }, function(){
    			$.ajax({
    				type : 'get',
    				url : $(obj).attr('data-url'),
    				data : {act:'del',del_id:a},
    				dataType : 'json',
    				success : function(data){
    					if(data == 1){
    						layer.msg('操作成功', {icon: 1});
    						$('input[name*='+name+']').each(function(i,o){
    							if($(o).is(':checked')){
    								$(o).parent().parent().remove();
    							}
    						})
    					}else{
    						layer.msg(data, {icon: 2,time: 2000});
    					}
    					layer.closeAll();
    				}
    			})
    		}, function(index){
    			layer.close(index);
    			return false;// 取消
    		}
    	);	
    }
    </script>        
  </head>
  <body style="background-color:#ecf0f5;">
 

<link href="/Public/plugins/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
<script src="/Public/plugins/daterangepicker/moment.min.js" type="text/javascript"></script>
<script src="/Public/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>

<style>
    td{height:40px;line-height:40px; padding-left:20px;}
    .span_1{
        float:left;
        margin-left:0px;
        height:130px;
        line-height:130px;
    }
    .span_1 ul{list-style:none;padding:0px;}
    .span_1 ul li{
        border:1px solid #CCC;
        height:40px;
        padding:0px 10px;
        margin-left:-1px;
        margin-top:-1px;
        line-height:40px;
    }
</style>
<div class="wrapper">
    <div class="breadcrumbs" id="breadcrumbs">
	<ol class="breadcrumb">
	<?php if(is_array($navigate_admin)): foreach($navigate_admin as $k=>$v): if($k == '后台首页'): ?><li><a href="<?php echo ($v); ?>"><i class="fa fa-home"></i>&nbsp;&nbsp;<?php echo ($k); ?></a></li>
	    <?php else: ?>    
	        <li><a href="<?php echo ($v); ?>"><?php echo ($k); ?></a></li><?php endif; endforeach; endif; ?>          
	</ol>
</div>

    <section class="content" style="padding:0px 15px;">
        <!-- Main content -->
        <div class="container-fluid">
            <div class="pull-right">
                <a href="javascript:history.go(-1)" data-toggle="tooltip" title="" class="btn btn-default" data-original-title="返回"><i class="fa fa-reply"></i></a>
            </div>
            <div class="panel panel-default">
                <div class="panel-body ">
                    <ul class="nav nav-tabs">
                        <?php if(is_array($group_list)): foreach($group_list as $k=>$vo): ?><li <?php if($k == 'reg'): ?>class="active"<?php endif; ?>><a href="javascript:void(0)" data-url="<?php echo U('System/index',array('inc_type'=>$k));?>" data-toggle="tab" onclick="goset(this)"><?php echo ($vo); ?></a></li><?php endforeach; endif; ?>
                    </ul>
                    <!--表单数据-->
                    <form method="post" id="handlepost" action="<?php echo U('System/handle');?>">
                        <!--通用信息-->
                        <div class="tab-content" style="padding:20px 0px;">
                            <div class="tab-pane active" id="tab_tongyong">
                                <table class="table table-bordered">
                                    <tbody>

                                        <tr>
                                            <td>会员注册账号类别：</td>
                                            <td>
                                                （手机注册 <img width="20" height="20" src="/Public/images/<?php if($config["reg_phone_statu"] == 1): ?>yes.png <?php else: ?>cancel.png<?php endif; ?>" onclick="changeTableVal('config','name','reg_phone_statu','value',this)"/>）
                                                （邮箱注册 <img width="20" height="20" src="/Public/images/<?php if($config["reg_email_statu"] == 1): ?>yes.png <?php else: ?>cancel.png<?php endif; ?>" onclick="changeTableVal('config','name','reg_email_statu','value',this)"/>）
                                                （账号注册 <img width="20" height="20" src="/Public/images/<?php if($config["reg_account_statu"] == 1): ?>yes.png <?php else: ?>cancel.png<?php endif; ?>" onclick="changeTableVal('config','name','reg_account_statu','value',this)"/>）
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>自动生成会员账号：</td>
                                            <td>
                                                <img width="20" height="20" src="/Public/images/<?php if($config["is_accoutn"] == 1): ?>yes.png <?php else: ?>cancel.png<?php endif; ?>" onclick="changeTableVal('config','name','is_accoutn','value',this)"/>
                                                账号前缀：<input type="text"  pattern="^\d{1,}$" title="只能输入数字" name="account_qz" value="<?php echo ($config["account_qz"]); ?>" >
                                                账号位数：<input type="text"  pattern="^\d{1,}$" title="只能输入数字" name="account_num" value="<?php echo ($config["account_num"]); ?>" ><font style="color:red">（位数 + 前缀 不超过 12 位）</font>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>会员注册黙认密码：</td>
                                            <td>
                                                <img width="20" height="20" src="/Public/images/<?php if($config["is_reg_user"] == 1): ?>yes.png <?php else: ?>cancel.png<?php endif; ?>" onclick="changeTableVal('config','name','is_reg_user','value',this)"/>
                                                <input type="text"  pattern="^\d{1,}$" title="只能输入数字" name="is_reg_user_1" value="<?php echo ($config["is_reg_user_1"]); ?>" ><b style="color:red;">【%】</b>提现
                                                <input type="text"  pattern="^\d{1,}$" title="只能输入数字" name="is_reg_user_2" value="<?php echo ($config["is_reg_user_2"]); ?>" ><b style="color:red;">【%】</b>回填
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>是否开启空单操作：</td>
                                            <td>
                                                <img width="20" height="20" src="/Public/images/<?php if($config["is_pass"] == 1): ?>yes.png <?php else: ?>cancel.png<?php endif; ?>" onclick="changeTableVal('config','name','is_pass','value',this)"/>
                                                登录密码：<input type="text"  pattern="^\d{1,}$" title="只能输入数字" name="pass" value="<?php echo ($config["pass"]); ?>" >
                                                交易密码：<input type="text"  pattern="^\d{1,}$" title="只能输入数字" name="repass" value="<?php echo ($config["repass"]); ?>" >
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>注册黙认状态：</td>
                                            <td>
                                                <input name="user_state" value="1" <?php if($config["user_state"] == 1): ?>checked<?php endif; ?> type="radio" />未激活<font style="color:red">（按报单费用激活，激活前先扣币）</font>
                                                <input name="user_state" value="2" <?php if($config["user_state"] == 2): ?>checked<?php endif; ?> type="radio" />己激活<font style="color:red">（按消费累计业绩升级）</font>
                                                <input name="user_state" value="3" <?php if($config["user_state"] == 3): ?>checked<?php endif; ?> type="radio" />己激活<font style="color:red">（按消费一次性最高业绩升级）</font>
                                                <input name="user_state" value="4" <?php if($config["user_state"] == 4): ?>checked<?php endif; ?> type="radio" />己激活<font style="color:red">（免注册报单费用，自由注册）</font>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>会员激活开关：</td>
                                            <td>
                                                自己激活      <img width="20" height="20" src="/Public/images/<?php if($config["is_jh1_statu"] == 1): ?>yes.png <?php else: ?>cancel.png<?php endif; ?>" onclick="changeTableVal('config','name','is_jh1_statu','value',this)"/> |
                                                推荐人激活    <img width="20" height="20" src="/Public/images/<?php if($config["is_jh2_statu"] == 1): ?>yes.png <?php else: ?>cancel.png<?php endif; ?>" onclick="changeTableVal('config','name','is_jh2_statu','value',this)"/> |
                                                服务中心激活  <img width="20" height="20" src="/Public/images/<?php if($config["is_jh3_statu"] == 1): ?>yes.png <?php else: ?>cancel.png<?php endif; ?>" onclick="changeTableVal('config','name','is_jh3_statu','value',this)"/> 
                                            </td>
                                        </tr>
                                        <!-- <tr>
                                            <td class="col-sm-2">激活会员方式【一】：</td>
                                            <td class="col-sm-8">
                                                <img width="20" height="20" src="/Public/images/<?php if($config["is_kt_1"] == 1): ?>yes.png <?php else: ?>cancel.png<?php endif; ?>" onclick="changeTableVal('config','name','is_kt_1','value',this)"/>
                                                <input type="number"  pattern="^\d{1,}$" title="只能输入数字"  class="input-sm" name="kt_1_1" value="<?php echo ($config["kt_1_1"]); ?>" style="width:68px;"> <b style="color:red;">【%】</b>现金币
                                            </td>
                                        </tr> -->
                                        <tr>
                                            <td class="col-sm-2">激活会员方式</td>
                                            <td class="col-sm-8">
                                                <img width="20" height="20" src="/Public/images/<?php if($config["is_kt_2"] == 1): ?>yes.png <?php else: ?>cancel.png<?php endif; ?>" onclick="changeTableVal('config','name','is_kt_2','value',this)"/>
                                                <input type="number"  pattern="^\d{1,}$" title="只能输入数字"  class="input-sm" name="kt_2_1" value="<?php echo ($config["kt_2_1"]); ?>" style="width:68px;"> <b style="color:red;">【%】【user_money】</b>现金币
                                                <input type="number"  pattern="^\d{1,}$" title="只能输入数字"  class="input-sm" name="kt_2_2" value="<?php echo ($config["kt_2_2"]); ?>" style="width:68px;"> <b style="color:red;">【%】【zuce_money】</b>激活币
                                            </td>
                                        </tr>
                                        <!-- <tr>
                                            <td class="col-sm-2">激活会员方式【三】：</td>
                                            <td class="col-sm-8">
                                                <img width="20" height="20" src="/Public/images/<?php if($config["is_kt_3"] == 1): ?>yes.png <?php else: ?>cancel.png<?php endif; ?>" onclick="changeTableVal('config','name','is_kt_3','value',this)"/>
                                                <input type="number"  pattern="^\d{1,}$" title="只能输入数字"  class="input-sm" name="kt_3_1" value="<?php echo ($config["kt_3_1"]); ?>" style="width:68px;"> <b style="color:red;">【%】</b>现金积分
                                                <input type="number"  pattern="^\d{1,}$" title="只能输入数字"  class="input-sm" name="kt_3_2" value="<?php echo ($config["kt_3_2"]); ?>" style="width:68px;"> <b style="color:red;">【%】</b>注册积分
                                                <input type="number"  pattern="^\d{1,}$" title="只能输入数字"  class="input-sm" name="kt_3_3" value="<?php echo ($config["kt_3_3"]); ?>" style="width:68px;"> <b style="color:red;">【%】</b>兑换积分
                                            </td>
                                        </tr> -->
                                        <tr>
                                            <td>推荐会员注册：</td>
                                            <td>
                                                （会员中心注册添加 <img width="20" height="20" src="/Public/images/<?php if($config["is_userreg_statu"] == 1): ?>yes.png <?php else: ?>cancel.png<?php endif; ?>" onclick="changeTableVal('config','name','is_userreg_statu','value',this)"/> ）
                                                （推广链接注册添加 <img width="20" height="20" src="/Public/images/<?php if($config["is_tgreg_statu"] == 1): ?>yes.png <?php else: ?>cancel.png<?php endif; ?>" onclick="changeTableVal('config','name','is_tgreg_statu','value',this)"/>）

                                            </td>
                                        </tr>
                                        <tr>
                                            <td>服务中心是否必填：</td>
                                            <td>
                                                <img width="20" height="20" src="/Public/images/<?php if($config["is_reg_zmd_statu"] == 1): ?>yes.png <?php else: ?>cancel.png<?php endif; ?>" onclick="changeTableVal('config','name','is_reg_zmd_statu','value',this)"/><font style="color:red">不填黙认为公司</font>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>身份证账号是否必填：</td>
                                            <td>
                                                <img width="20" height="20" src="/Public/images/<?php if($config["is_reg_card_statu"] == 1): ?>yes.png <?php else: ?>cancel.png<?php endif; ?>" onclick="changeTableVal('config','name','is_reg_card_statu','value',this)"/>
                                                最多使用次数：<input type="number"  pattern="^\d{1,}$" title="只能输入数字" name="reg_card_num" value="<?php echo ((isset($config["reg_card_num"]) && ($config["reg_card_num"] !== ""))?($config["reg_card_num"]):'1'); ?>" ><font style="color:red">黙认为 “1” 0 为不限</font>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>手机号是否必填：</td>
                                            <td>
                                                <img width="20" height="20" src="/Public/images/<?php if($config["is_reg_phone_statu"] == 1): ?>yes.png <?php else: ?>cancel.png<?php endif; ?>" onclick="changeTableVal('config','name','is_reg_phone_statu','value',this)"/>
                                                最多使用次数：<input type="number"  pattern="^\d{1,}$" title="只能输入数字" name="reg_phone_num" value="<?php echo ((isset($config["reg_phone_num"]) && ($config["reg_phone_num"] !== ""))?($config["reg_phone_num"]):'1'); ?>" ><font style="color:red">黙认为 “1” 0 为不限</font>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>注册必填选项：</td>
                                            <td>
                                                开户姓名   <img width="20" height="20" src="/Public/images/<?php if($config["reg_bt_1"] == 1): ?>yes.png <?php else: ?>cancel.png<?php endif; ?>" onclick="changeTableVal('config','name','reg_bt_1','value',this)"/> |
                                                呢称      <img width="20" height="20" src="/Public/images/<?php if($config["reg_bt_2"] == 1): ?>yes.png <?php else: ?>cancel.png<?php endif; ?>" onclick="changeTableVal('config','name','reg_bt_2','value',this)"/> |
                                                微信      <img width="20" height="20" src="/Public/images/<?php if($config["reg_bt_3"] == 1): ?>yes.png <?php else: ?>cancel.png<?php endif; ?>" onclick="changeTableVal('config','name','reg_bt_3','value',this)"/> |
                                                Q&nbsp;Q <img width="20" height="20" src="/Public/images/<?php if($config["reg_bt_4"] == 1): ?>yes.png <?php else: ?>cancel.png<?php endif; ?>" onclick="changeTableVal('config','name','reg_bt_4','value',this)"/> |
                                                邮箱      <img width="20" height="20" src="/Public/images/<?php if($config["reg_bt_5"] == 1): ?>yes.png <?php else: ?>cancel.png<?php endif; ?>" onclick="changeTableVal('config','name','reg_bt_5','value',this)"/> |
                                                支付宝    <img width="20" height="20" src="/Public/images/<?php if($config["reg_bt_6"] == 1): ?>yes.png <?php else: ?>cancel.png<?php endif; ?>" onclick="changeTableVal('config','name','reg_bt_6','value',this)"/> |
                                                开户银行    <img width="20" height="20" src="/Public/images/<?php if($config["reg_bt_7"] == 1): ?>yes.png <?php else: ?>cancel.png<?php endif; ?>" onclick="changeTableVal('config','name','reg_bt_7','value',this)"/> |
                                                分行支行  <img width="20" height="20" src="/Public/images/<?php if($config["reg_bt_8"] == 1): ?>yes.png <?php else: ?>cancel.png<?php endif; ?>" onclick="changeTabl